package cn.chia.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.chia.back.dao.IStorekeeperDAO;
import cn.chia.pojo.TblUser;
import cn.chia.service.StorekeeperService;
@Service
public class StorekeeperServiceImpl implements StorekeeperService {
	private IStorekeeperDAO storekeeperDao;
	
	@Resource(name="storekeeperDAOImpl")
	public void setStorekeeperDao(IStorekeeperDAO storekeeperDao) {
		this.storekeeperDao = storekeeperDao;
	}

	public TblUser findByUserPass(String username, String password)
			throws Exception {
		List<?> list = storekeeperDao.findByUserPass(username,password);
		return list.size()>0?(TblUser)list.get(0):null;
	}

}
